package com.workoutdiary.entities;

import com.workoutdiary.service.TimeAndDateUtil;

public class MCycleRecord {
	private int id;
	private int userId;
	private long timestamp;
	private int fase;
	private String description;

	public MCycleRecord(int userId, long timestamp, int fase, String description) {
		this.userId = userId;
		this.timestamp = timestamp;
		this.fase = fase;
		this.description = description;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public int getFase() {
		return fase;
	}

	public void setFase(int fase) {
		this.fase = fase;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Object[] getMCycleRecord() {
		Object[] array = new Object[]{id, TimeAndDateUtil.buildDateString(timestamp) , fase, description};
		
		return array;
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(this.id);
		builder.append(" ");
		builder.append(this.userId);
		builder.append(" ");
		builder.append(this.timestamp);
		builder.append(" ");
		builder.append(this.fase);
		builder.append(" ");
		builder.append(this.description);
		return builder.toString();
	}
	
}
